package com.cloud.lan.entity.enums;

import com.cloud.lan.entity.base.exceptions.ILanError;

/**
 * 错误码（01）
 * @author ErKang
 * @date Created in 2021/12/13 11:39
 * @title LittaOrderError.java
 * Department: Product development
 */
public enum LanError implements ILanError {
    /** OK */
    OK("00000", "正确"),
    /** 参数非法 */
    ILLEGAL_PARAMS("99998", "参数不合法"),
    /** 一般错误 */
    ERROR("99999", "通常错误"),

    // 基础错误码 010001
    LAN_010001("010001", "登录超时"),
    LAN_010002("010002", "验证码过期!请重试"),
    LAN_010003("010003", "图片验证码错误!请重试"),
    LAN_010004("010004", "短信验证码过期!请重试"),
    LAN_010005("010005", "短信验证码错误!请重试"),
    LAN_010006("010006", "用户openId不能为空"),
    LAN_010007("010007", "不能为空"),
    LAN_010008("010008", "没有查询到相关信息"),
    LAN_010009("010009", "不能重复"),
    LAN_010010("010010", "请上传正确的文件"),
    LAN_010011("010011", "{} 不存在"),

    // 兑换码活动错误码 020001
    LAN_020001("020001", "此兑换券没查到或已核销过"),
    LAN_020002("020002", "你已经领取过，无法再次领取"),
    LAN_020003("020003", "当前库存不足，无法购买"),
    LAN_020004("020004", "兑换券已下架"),
    LAN_020005("020005", "口令错误，请和店员核实"),
    LAN_020006("020006", "您已经填写过问卷"),
    LAN_020007("020007", "短信发送次数上限，请稍后再试"),
    LAN_020008("020008", "兑换成功，请向店员展示"),
    LAN_020009("020009", "不在领取活动时间范围内"),
    LAN_020010("020010", "活动未开始"),

    // 白名单错误码 030001
    LAN_030001("020001", "白名单ID不能为空"),
    LAN_030002("020002", "白名单信息已存在"),

    // 门店相关错误码 040001
    LAN_040001("040001", "店铺名称不能重复"),
    LAN_040002("040002", "没有查询到店铺信息"),

    // 商品相关错误码 040001
    LAN_050001("050001", "商品名称不能重复"),
    LAN_050002("050002", "商品图不能为空"),
    LAN_050003("050003", "商品地址绑定重复"),
    ;

    private final String code;
    private final String msg;

    LanError(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }
}
